home *** CD-ROM | disk | FTP | other *** search
- Path: news.lpr.carel.fi!usenet
- From: Ari Lukumies <aril@cmt.lpr.mail.carel.fi>
- Newsgroups: comp.lang.c
- Subject: Re: C grammar for yacc
- Date: Tue, 23 Jan 1996 14:39:17 +0200
- Organization: Carelcomp Forest
- Message-ID: <3104D6F5.136E@cmt.lpr.mail.carel.fi>
- References: <4e0ecm$r8r@news.cc.brandeis.edu>
- NNTP-Posting-Host: renoir.cclahti.carel.fi
- Mime-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: 8bit
- X-Mailer: Mozilla 2.0b6a (WinNT; I)
-
- Michael Bukatin wrote:
- >
- > I am looking for a C grammar in yacc/lex format (to use in
- > a custom-made program of analysis and transformation of C code).
- >
- > If someone knows where I can find the files with such grammar,
- > I would greatly appreciate this information.
- >
- > Misha
-
- One place to look at is the book `Implementing compiler languages in
- C┤ by Allen I. Holub (Prentice-Hall), where you start off by writing a
- lex-like tool and a yacc-like tool, and end up by having definitions
- for a C language subset that you can then improve. Also, some Unix
- variants (like Linux) I've seen come with a C grammar (and many
- others, too).
-
- HTH,
- AriL
- --
- All my opinions are mine and mine alone.
-